﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package com.zynga.skelly.util {

    public class Curry {

        public static function curry(_arg1:Function, ... _args):Function{
            var closure:* = _arg1;
            var args:* = _args;
            return (function (... _args){
                return (closure.apply(null, args.concat(_args)));
            });
        }
        public static function continuation(_arg1:Function, _arg2:Function, _arg3:Number):Function{
            var closure1:* = _arg1;
            var closure2:* = _arg2;
            var numArgs1:* = _arg3;
            return (function (... _args){
                var _local2:* = _args.splice(0, numArgs1);
                closure1.apply(null, _local2);
                closure2.apply(null, _args);
                _local2 = null;
                var _local1:Array;
            });
        }

    }
}//package com.zynga.skelly.util 
